export default {
    state:{
        //存储登录状态的用户名和用户密码，避免刷新重新跳回登录页面
        // userInfo:(localStorage.getItem("loginData")&&JSON.parse(localStorage.getItem("loginData")))||{},
        user:(localStorage.getItem("userInfo")&&JSON.parse(localStorage.getItem("userInfo")))||{},
        token:(localStorage.getItem("token")&&JSON.parse(localStorage.getItem("token")))||"",
        
        // imgUrl:(sessionStorage.getItem("imgUrl"))||""
    },
    mutations:{
        // setUserInfo(state,uInfo){
        //     state.userInfo=uInfo
        // },
        user(state,user){
            state.user=user
        },
        token(state,token){
            state.token=token
        },
        // imgUrl(state,imgUrl){
        //     state.imgUrl=imgUrl
        // },


    }
}